﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using Entity;

namespace BIZ
{
    public class Menu_l1BIZ
    {
        Menu_l1DAL DAL = new Menu_l1DAL();

        //---------------------Menu_l1SearchById-----------------------------
        public List<objMenu_l1> Menu_l1SearchById(int id)
        {
            try
            {
                List<objMenu_l1> lst = new List<objMenu_l1>();
                lst = DAL.Menu_l1SearchById(id);

                return lst;
            }
            catch (Exception)
            {
                throw;
            }
        }

        //---------------------Menu_l1Insert-----------------------------
        public int Menu_l1Insert(string name, int position)
        {
            try
            {
                int i = DAL.Menu_l1Insert(name, position);

                return i;
            }
            catch (Exception)
            {
                throw;
            }
        }

        //---------------------Menu_l1Update-----------------------------
        public int Menu_l1Update(int id, string name, int position)
        {
            try
            {
                int i = DAL.Menu_l1Update(id, name, position);

                return i;
            }
            catch (Exception)
            {
                throw;
            }
        }

        //---------------------Menu_l1Delete-----------------------------
        public int Menu_l1Delete(int id)
        {
            try
            {
                int i = DAL.Menu_l1Delete(id);

                return i;
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}
